version 14
clear
capture log close

*cd "/Users/aboydstun/Dropbox/Political Actors/Data/descriptor data/coded data/Analysis"
*log using "analysis_replication.log", replace

*#delimit ;
set more off 

*     *************************************************************** 	*
*       File-Name:      analysis_replication.do					    	*
*       Date:           August 4, 2017                              	*
*		Updated:		February 14, 2019								*
*       Author:         Amber Boydstun									*
*       Purpose:        Analyze NYT & WaPo data across 11 time points	*
*     ****************************************************************  *

#delimit ; 

*** Use dataset;
use Boydstun_Lawrence_data.dta, replace;


*** NOTES ON TIME POINTS
1. June 16th, 2015 Trump launches campaign
2. Aug 6th, 2015 1st Republican debate/Megyn Kelly
3. Dec 7th, 2015 Trump calls for banning Muslims
4. Feb 1st, 2016 Trump loses Iowa
5. March 15th, 2016 Super Tuesday II – Rubio exits
6. May 3rd, 2016 Cruz and Kasich exit
7. May 26th, 2016 Trump reaches delegate threshold
8. Aug 1st, 2016 Trump attacks Gold Star family
9. Sept 26th, 2016 1st presidential debate
10. Oct 7th, 2016 Trump hot mic moment
11. Oct 28th, 2016 Comey’s letter to Congress
;


***************************************************;
*** 	ANALYSIS FOR PERSPECTIVES ON POLITICS 	***;
***************************************************;

tab2 blog serious, row;
tab2 blog clown, row;

ttest serious, by(blog);
ttest clown, by(blog);

tab blog, freq;


*******LOOKING AT CORRELATIONS*******;

corr serious contender_pos;
corr clown contender_neg;


*******LOOKING AT EDITORIALS VS. HARD NEWS IN PRINT ARTICLES*******;

drop if blog==1;

tab locationtypel;
order locationtypel locationtype;
gen editorial=0;
replace editorial = 1 if 
	strpos(locationtypel, "editorial") |
	strpos(locationtypel, "op-ed") |
	strpos(locationtypel, "opinion") ;

tab locationtypel editorial;

tab2 editorial serious, row;
tab2 editorial clown, row;

ttest serious, by(editorial);
ttest clown, by(editorial);

* END *;
